package transaction

import "bytes"

type TxOutput struct{
	Value int // output amount
	ToAddress []byte // output address
}

type TxInput struct{
	TxId []byte // pre-tx id
	OutIdx int // index of pre-tx output
	FromAddress []byte // input-from equals output-to
}


// utils check address
func (in *TxInput) FromAddressRight(address []byte) bool {
	return bytes.Equal(in.FromAddress, address)
}

func (out *TxOutput) ToAddressRight(address []byte) bool {
	return bytes.Equal(out.ToAddress, address)
}
